import java.util.Arrays;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        int[] arr={2,4,5,9,1,0,10,7,6,3,8};
        int tmp=0;
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = 0; j < (arr.length)-i; j++) {
                tmp = 0;
                if((arr[j])<(arr[j++])) {
                    tmp=arr[j];
                    arr[j]=arr[j++];
                    arr[j++]=tmp;
                }
            }
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }
    }
    public static void main3(String[] args) {
        int[]arr={9,9,1};
        int sum = 0;
        for (int i = 0; i < arr.length; i++) {
            sum+=arr[i];
        }
        int avg = sum/arr.length;
        System.out.println(avg);
    }
    public static void main2(String[] args) {
        int[] arry={1,2,3,4,5};
        Scanner sc = new Scanner(System.in);
        int key = sc.nextInt();
        int left=0;
        int right=arry.length-1;
        int mid = 0;
        int flag=-1;
        while(left<=right) {
            mid=(left+right)/2;
            if (key < arry[mid]) {
                right = mid-1;
            }else if(key > arry[mid]) {
                left = mid+1;
            }else {
                System.out.println("找到了");
                flag=1;
                break;
            }
        }
        if (flag==-1) {
            System.out.println("没有这个数");
        }
    }
   /* public static void main(String[] args) {
        int[] arr ={2,3,5,1,9,10,0,4,6,7,8};
        int tmp = 0;
        for (int i = 0; i < arr.length-1; i++) {
            for (int j = 0; j < arr.length-i; j++) {
                if (arr[j]>arr[j+1]) {
                    tmp=arr[j+1];
                    arr[j+1]=arr[j];
                    arr[j]=tmp;
                }
            }
        }
        for (int i = 0; i < arr.length; i++) {
            System.out.println(arr[i]);
        }*/
   /* }*/
}

